//
// Created by Administrator on 2025/10/23.
//

#include "Test12.h"
#include <utility>
#include "cstdio"
#include <iostream>
#include <vector>
#include <stack>
#include <memory>
#include <unordered_map>
#include <map>


void T12::T12C1::foo1(int &&t) {
    printf("左值 %d", t);
}

void T12::T12C1::foo1(int &t) {
    printf("右值 %d", t);
}

void T12::t11Foo1(int &a) {
    printf("左值引用 %d", a);
}

void T12::t11Foo1(int &&ss) {
    printf("右值引用 %d", ss);
}


void T12::t11Foo2(int &a, int *b, int c) {

}

void T12::t12Foo1(int ar[]) {
    printf(" ar value >> %d", ar[0]);
}


int *T12::t12Foo2(int *a) {
    return nullptr;
}

void T12::T12Struct1::foo1() {

}

void T12::t12Foo3() {
}


void FormatPrint() {
    std::cout << std::endl;
}

template<class T, class ...Args>
void FormatPrint(T first, Args... args) {
    std::cout << "[" << first << "]";
    FormatPrint(args...);
}

template<typename ...Args>
auto sum(Args... args) {
    return (... + args);
}

void T12::T12C6::foo1() {
}

void T12::t12Foo4() {
//    FormatPrint(1, 2, 3);
    std::cout << sum(1, 2, 3);
}

void T12::t12Foo5() {
}

void T12::t12Foo6() {
    std::unique_ptr<T12C7> ptr = std::make_unique<T12C7>(T12C7(1));
    ptr->foo1();
}


void T12::T12C7::foo1() {
    printf(" foo1 ok");
}
